import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

var indexRouter=[{
	path: '/',
	redirect: '/index',
	hidden: true
}]
import children from '@/router/children.js'

var _isOrganUser = localStorage.getItem('isOrganUser');
if(_isOrganUser==1){
	//分局
	indexRouter[0].redirect = '/jgzl'
}
let allRouter=indexRouter.concat(children);
for(let i =0;i<allRouter.length;i++){
	allRouter[i].name=allRouter[i].alias;
}

export default new Router({
	routes: allRouter
})
